/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.persistence.dao;

import java.util.Collection;

import com.genia.toolbox.persistence.basis.manager.AbstractRestrictionsManager;
import com.genia.toolbox.persistence.criteria.Criteria;
import com.genia.toolbox.persistence.criteria.criterion.Criterion;
import com.genia.toolbox.persistence.criteria.criterion.Junction;
import com.genia.toolbox.persistence.criteria.enumeration.MatchMode;
import com.genia.toolbox.persistence.criteria.field.Field;
import com.genia.toolbox.persistence.exception.AggregateException;
import com.genia.toolbox.persistence.manager.RestrictionsManager;

class DumbRestrictionsManager
    extends AbstractRestrictionsManager
{
  private RestrictionsManager restrictionsManager;



  /**
   * getter for the restrictionsManager property.
   * 
   * @return the restrictionsManager
   */
  public RestrictionsManager getRestrictionsManager()
  {
    return restrictionsManager;
  }



  /**
   * setter for the restrictionsManager property.
   * 
   * @param restrictionsManager
   *          the restrictionsManager to set
   */
  public void setRestrictionsManager(final RestrictionsManager restrictionsManager)
  {
    this.restrictionsManager = restrictionsManager;
  }



  /**
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#accept()
   */
  public Criterion accept()
  {
    return restrictionsManager.accept();
  }



  /**
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#conjunction()
   */
  public Junction conjunction()
  {
    return restrictionsManager.conjunction();
  }



  /**
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#disjunction()
   */
  public Junction disjunction()
  {
    return restrictionsManager.disjunction();
  }



  /**
   * @param field1
   * @param field2
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#equals(com.genia.toolbox.persistence.criteria.field.Field,
   *      com.genia.toolbox.persistence.criteria.field.Field)
   */
  public Criterion equals(final Field field1, final Field field2)
  {
    return restrictionsManager.equals(field1, field2);
  }



  /**
   * @param field1
   * @param field2
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#greaterOrEquals(com.genia.toolbox.persistence.criteria.field.Field,
   *      com.genia.toolbox.persistence.criteria.field.Field)
   */
  public Criterion greaterOrEquals(final Field field1, final Field field2)
  {
    return restrictionsManager.greaterOrEquals(field1, field2);
  }



  /**
   * @param field1
   * @param field2
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#greaterThan(com.genia.toolbox.persistence.criteria.field.Field,
   *      com.genia.toolbox.persistence.criteria.field.Field)
   */
  public Criterion greaterThan(final Field field1, final Field field2)
  {
    return restrictionsManager.greaterThan(field1, field2);
  }



  /**
   * @param field
   * @param collection
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#isIn(com.genia.toolbox.persistence.criteria.field.Field,
   *      java.util.Collection)
   */
  public Criterion isIn(final Field field, final Collection<?> collection)
  {
    return restrictionsManager.isIn(field, collection);
  }



  /**
   * @param field
   * @param criteria
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#isIn(com.genia.toolbox.persistence.criteria.field.Field,
   *      com.genia.toolbox.persistence.criteria.Criteria)
   */
  public Criterion isIn(final Field field, final Criteria<?> criteria)
  {
    return restrictionsManager.isIn(field, criteria);
  }



  /**
   * @param field1
   * @param field2
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#isIn(com.genia.toolbox.persistence.criteria.field.Field,
   *      com.genia.toolbox.persistence.criteria.field.Field)
   */
  public Criterion isIn(final Field field1, final Field field2)
  {
    return restrictionsManager.isIn(field1, field2);
  }



  /**
   * @param field
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#isNull(com.genia.toolbox.persistence.criteria.field.Field)
   */
  public Criterion isNull(final Field field)
  {
    return restrictionsManager.isNull(field);
  }



  /**
   * @param field1
   * @param field2
   * @param matchMode
   * @return
   * @throws AggregateException
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#like(com.genia.toolbox.persistence.criteria.field.Field,
   *      com.genia.toolbox.persistence.criteria.field.Field,
   *      com.genia.toolbox.persistence.criteria.enumeration.MatchMode)
   */
  public Criterion like(final Field field1, final Field field2, final MatchMode matchMode)
      throws AggregateException
  {
    return restrictionsManager.like(field1, field2, matchMode);
  }



  /**
   * @param criterion
   * @return
   * @see com.genia.toolbox.persistence.manager.RestrictionsManager#not(com.genia.toolbox.persistence.criteria.criterion.Criterion)
   */
  public Criterion not(final Criterion criterion)
  {
    return restrictionsManager.not(criterion);
  }

}
